﻿<?php
  ob_clean();

  $id = !empty($_GET['id'])?$_GET['id']:0;
  $sql = "select * from `cate` where `pid` = $id ";
  $result = mysqli_query($GLOBALS['link'],$sql);
  $cate = array();
  while ($data=mysqli_fetch_assoc($result)){
    $cate[]=$data;
  }

  if (!empty($_SERVER['HTTP_X_REQUESTED_WITH'])) {
      echo json_encode($cate);
      die;
  }


     //视图加载页面
    include (VIEW_LAYER.'/admin/layout.html');




